package nodes;

import model.Model;

/**
 * Used to store a constant value (such as the 50 in fw50)
 * 
 * @author Andrew Patterson
 */
public class ConstantNode extends AbstractNode
{
    int myValue;

    public ConstantNode (int value, Model model)
    {
        super(model);
        myValue = value;
    }
    
    public ConstantNode(int value)
    {
        this(value , null);
    }
    
    public AbstractNode evaluate ()
    {
        return this;
    }
    
    @Override
    public int getValue()
    {
        return myValue;
    }
    
    @Override
    public String toString ()
    {
        return myValue + "";
    }
}
